﻿<Window x:Class="Windows7.DesktopIntegration.LibraryManagerDemo.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Windows7.DesktopIntegration.LibraryManagerDemo"
    Title="Library Manager" Height="600" Width="800">
    <Window.Resources>
        <local:TextConverter x:Key="TextConverter" />
        <local:NullToBoolConverter x:Key="NullToBoolConverter" />
    </Window.Resources>
    <!--<Viewbox Height="Auto" Margin="5" Name="viewbox1" VerticalAlignment="Stretch">-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="225.432*" />
            <ColumnDefinition Width="219.978*" />
        </Grid.ColumnDefinitions>
        <Button Height="23" Margin="12" Grid.Column="0" Grid.Row="0"  Name="_openLibraryButton" VerticalAlignment="Top" Click="OpenLibraryButtonClick">Open Library</Button>
        <Button Height="23" Margin="12" Grid.Column="0" Grid.Row="1" Name="_createLibraryButton" Click="CreateLibraryButtonClick"  VerticalAlignment="Bottom">Create New Library</Button>
        <Button Height="23" Margin="12" Grid.Column="1" Grid.Row="0" Name="_addDirectoryToLibraryButton" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" VerticalAlignment="Top" Click="AddDirectoryToLibraryClick">Add Directory</Button>
        <Button Height="23" Margin="12" Grid.Column="1" Grid.Row="1" Name="_removeDirectoryFromLibraryButton" IsEnabled="{Binding ElementName=_foldersListBox, Path=SelectedItem, Converter={StaticResource NullToBoolConverter}}" Click="RemoveDirectoryFromLibraryClick" VerticalAlignment="Bottom">Remove Directory</Button>
        <Button Height="23" Margin="12" Grid.Column="0" Grid.Row="2" Name="_openLibraryManageUIButton" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" Click="OpenLibraryManageUIClick" VerticalAlignment="Bottom">Open Library Manage UI</Button>
        <Button Height="23" Margin="12" Grid.Column="1" Grid.Row="2" Name="_setDefaultSaveFolderButton" IsEnabled="{Binding ElementName=_foldersListBox, Path=SelectedItem, Converter={StaticResource NullToBoolConverter}}" Click="SetDefaultSaveFolderClick" VerticalAlignment="Bottom">Set Default Save Folder</Button>
        <Button Height="23" Margin="12" Grid.Column="0" Grid.Row="3" Name="_deleteLibraryButton" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" Click="DeleteLibraryButtonClick" VerticalAlignment="Bottom">Delete Library</Button>
        <ComboBox Height="23" Margin="12" Grid.Column="1" Grid.Row="3" Name="_setFolderTypeComboBox" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" ItemsSource="{Binding Path=FolderTypeList}" SelectedValue="{Binding Path=FolderType}"  VerticalAlignment="Bottom"></ComboBox>
        <CheckBox Height="23" Margin="12" Grid.Column="0" Grid.Row="4" Name="_pinnedToNavigationPaneCheckBox" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" IsChecked="{Binding Path=IsPinnedToNavigationPane}"  VerticalAlignment="Bottom">Is Pinned To Navigation Pane</CheckBox>
        <Button Height="23" Margin="12" Grid.Column="1" Grid.Row="4" Name="_setLibraryIcon" IsEnabled="{Binding ElementName=_textBlockName, Path=Text, Converter={StaticResource TextConverter}}" Click="SetLibraryIconClick" VerticalAlignment="Bottom">
            <Image Name="_imageIcon"  Source="{Binding Path=Icon}"/>
        </Button>
        <TextBlock TextAlignment="Center" Grid.Column="0" Grid.Row="5" TextDecorations="None" Padding="12" Height="39.996" VerticalAlignment="Top">Name:</TextBlock>
        <TextBlock Padding="12" Grid.Column="0" Grid.Row="6" TextAlignment="Center" TextDecorations="None" Height="39.996" VerticalAlignment="Top">Save Directory:</TextBlock>
        <TextBlock Name="_textBlockName" Padding="12" Grid.Column="1" Grid.Row="5" TextAlignment="Left" TextDecorations="None" Text="{Binding Path=LibraryName}" Height="39.996" VerticalAlignment="Top"></TextBlock>
        <TextBlock Name="_textBlockDefaultSaveDirectory" Padding="12" Grid.Column="1" Grid.Row="6" TextAlignment="Left" TextDecorations="None" Text="{Binding Path=DefaultSaveFolder}" Height="39.996" VerticalAlignment="Top" />
        <TextBlock Padding="12" Grid.Row="7" TextAlignment="Center" TextDecorations="None" Grid.ColumnSpan="2">Folders:</TextBlock>
        <ListBox Grid.Row="8" Name="_foldersListBox" ItemsSource="{Binding Path=FolderList}" Grid.ColumnSpan="2" />
    </Grid>
        <!--</Viewbox>-->
</Window>
